module Permissions
  CREATE_MAIL = :create_mail
  DELIVER_MAIL = :deliver_mail
  VIEW_REPORT = :view_report
  CREATE_ADMIN = :create_admin
  CREATE_USER = :create_user
  CREATE_USER_GROUP = :create_user_group
  CREATE_ROLE = :create_role

  def self.each
    constants.sort.each do |c|
      yield const_get(c)
    end
  end
end